专利摘要:
Method for processing a raster image comprising a grid of pixels, the method comprising the steps of: defining a matrix of pixels corresponding to a sub-region of the image; perform edge detection along the rows and columns of the matrix; counting the number of edges detected along the rows of the matrix to determine the number of horizontal edges in the matrix; counting the number of edges detected along the columns of the matrix to determine the number of vertical edges in the matrix; identifying whether the sub-region is raster based on the number of horizontal and vertical edges in the matrix; and selectively processing the corresponding sub-region of the image depending on whether the sub-region is identified as being raster or not. The identification step can also be based on the length of similar pixel segments in the rows of the matrix.
公开号:BE1026095B1
申请号:E20195141
申请日:2019-03-07
公开日:2020-11-09
发明作者:Brecht Milis;Michel Dauw;Frédéric Collet
申请人:Iris Sa;
IPC主号:
专利说明:

Image Processing Device This invention generally relates to an image processing method and device. More precisely, but not exclusively, the invention relates to a method and a device for processing an image with a view to a subsequent optical character recognition (OCR) method, for example, by identifying the regions of the image d. entry that are screened.
State of the art It is known that image processing devices can be used to recognize text and other objects in an image.
For example, OCR devices are often used to recognize and convert the text of an input digital image to machine encoded form, such as ASCII code. The image can be, for example, a PDF of a scanned document which is received by an OCR device of a scanner. However, alternatively of course, the image can be received from other sources such as a computer and / or in other file formats such as TIFF or JPEG.
Usually, to improve the chances of successfully recognizing text in an input image, OCR systems preprocess the input image to, for example, separate text from background data (for example, to separate text from background data. rest of the image). This separation process usually involves binarizing the image to selectively convert text to white and everything else to black (or vice versa).
However, some input images are formed by dithering, a common imaging technique that creates the illusion of color depth from a limited color palette. Such raster images, or raster regions of an image, produce non-uniform backgrounds which can complicate the binarization process and lead to dotted noise in the binary image. This noise can reduce the efficiency of the binarization step to separate the text from the background and, therefore, greatly reduce the accuracy and speed of a subsequent OCR process. Another problem with frame backgrounds is that they make it difficult to establish an appropriate binarization threshold to separate all text, which, as a result, can cause some text boxes to be incorrectly set to the same color as the background data.
To suppress / remove the effects of dithering in an input image, some prior image processing methods smooth the input image during the preprocessing step, possibly before binarization. A disadvantage of these approaches is that they require additional processing time and resources to smooth the entire input image. In addition, it can be difficult to set an appropriate level of smoothing that does not make the image too blurry and reduces the contrast of the text. For at least these reasons, these preprocessing methods can reduce the efficiency, quality and speed of the binarization and / or character recognition steps.
EP 1 455 304 A2 (D1) describes a method of labeling digital image data, comprising: a) detecting edges defined by image data having a first resolution; b} detecting edges defined by image data having a second resolution; c} combine the results of a) with the results of b) to define intermediate image data; and d) associating a tag with each pixel of the image data.
US 6,160,913 A (D2) describes an image processing method for detecting and eliminating halftone dots, said method comprising the steps of converting a gray scale image into a gray scale image. binary threshold with halftone regions identifying halftone regions in the binary threshold image, wherein the step of identifying the halftone regions is performed by: classifying the binary threshold image for produce a halftone classification map; reclassifying the halftone classification map to produce a row last-tone reclassification map with plural halftone pixels in each row; merge the halftone pixels in each line in the halftone reclassification map to produce a halftone line map, and merge the lines of the halftone line map to produce a region map in half-tone; and removing the halftone dots from the identified halftone regions.
The present invention aims to provide an image processing method and device for dealing with at least some of the aforementioned issues.
Disclosure of the Invention According to a first aspect, the invention provides a method of processing a raster image comprising a grid of pixels (preferably before the object detection processing), the method comprising the steps of: defining a matrix of pixels corresponding to a sub-region of the image; performing edge detection along the rows and columns of the matrix; counting the number of edges detected along the rows of the matrix to determine the number of horizontal edges in the matrix; counting the number of edges detected along the columns of the matrix to determine the number of vertical edges in the matrix; identify whether the sub-region is rasterized based on the number of horizontal and vertical edges in the matrix; and selectively processing the corresponding sub-region of the image depending on whether or not the sub-region is identified as being rasterized.
According to a second aspect, the invention provides a method of processing an iramed image comprising a grid of pixels (preferably before the object detection processing), the method comprising the steps of: defining a corresponding pixel matrix to a sub-region of the image; detecting segments of similar pixels in rows of the array, wherein the difference in pixel value between neighboring pixels in a segment is less than a predetermined contrast threshold; identify if the sub-region is rasterized according to the lengths of the segments; and selectively processing the corresponding sub-region of the image depending on whether or not the sub-region is identified as being rasterized.
Accordingly, it will be seen that the methods submitted here are methods of selectively processing a given sub-region of an image depending on whether or not the sub-region is identified as being a raster portion of the image. In this way,
different sub-regions of an image can be processed differently to better handle the dithering there.
Selective treatment may consist of deciding "whether to" and / or "how" to treat the corresponding sub-region.
For example, the selective processing may include applying a screening removal process to the sub-region of the image if the sub-region is identified as being screened, and optionally not applying a screening process. rasterization to the sub-region of the image if the sub-region is not identified as rasterized. In this way, processing resources can be saved by not re-applying the screening removal method to sub-regions which are not screened.
Additionally or alternatively, the selective processing may include the application of a binarization technique with adaptive thresholding to accommodate different conditions between screened and non-screened regions. For example, the step of selective processing may comprise (N processing the sub-region of the image with a binarization process having a first binarization threshold if the sub-region is identified as being rasterized, and {ij the processing the sub-region of the image with a binarization method having a different second binarization threshold if the sub-region is not identified as raster. In this way, the binarization technique can more efficiently separate the text of the background of the image.
In other examples, image processing techniques other than binarization or screening elimination can be applied adaptively (eg, by changing one or more of their control parameters) to a subregion of the. 'image in whether the sub-region is identified as rasterized or not.
Thus, in general, it will be seen that the step of selective processing can comprise the processing of the sub-region of the image if it is identified as being screened, and possibly not to process the sub-region if it is not. identified as rasterized. Alternatively, the step of selective processing may comprise the processing of the sub-region of the image according to a first method if it is identified as being rasterized and the processing of the sub-region of the image according to a second different method if the sub-region is not identified as rasterized.
The method of removing dithering may include applying a smoothing function to the corresponding subregion of the image.
In some cases, the methods may also include determining the average edge length in the subregion of the image, and establishing a dithering removal process control parameter to control the level of screening. dithering to a value based on the determined average edge length. Preferably, the smoothing radius is set to a value based on the average edge length, as it allows optimized smoothing without excessive blurring of text and / or other objects that may be present in the image. It is of course important to avoid excessive blurring to improve the accuracy of subsequent object detection methods (eg, subsequent OCR methods).
The screening elimination process can be organized so as to at least reduce screening. ideally, however, the screening elimination method substantially eliminates screening.
Thus, it will be appreciated that the methods can selectively process an image having a raster region to provide an enhanced image. Preferably, the methods selectively process the image before an object detection method such as an OCR method.
It will also be seen that edge detection detects edges along the rows of the matrix (i.e. along the rows and columns of the matrix).
The edge detection method can be considered as an invention in its own right and can therefore constitute another aspect of the invention in itself. Preferably, edge detection comprises the steps of: 1) detecting local extrema (eg, local maximum and local minimum) along a line; iN} identify successive local pairs of extremes of opposite types (for example, a local minimum followed by a local maximum);
{ii} identify the local maximum and / or the local minimum in a pair of successive local extremes of opposite types identified as being an edge.
A local minimum can be a pixel whose value is either (1) lower than that of its two neighboring pixels, or (ij) identical to that of one of its neighboring pixels and lower than that of the other neighboring pixel. Likewise, a local maximum can be a pixel whose value is either (1) greater than that of its two neighboring pixels, or {Hi} identical to that of one of its neighboring pixels and greater than that of the other pixel neighbour. Neighboring pixels are preferably on the same line as the local minimum / maximum and are directly adjacent to the local minimum / maximum.
A local maximum (or local minimum) of a pair of successive local extremes of opposing types can be identified as an edge if it is determined that it satisfies (1) a criterion based on the difference in value of the pixels between the local maximum and the local minimum of the pair, and / or (ij) to a criterion based on the number of pixels between the local maximum and the local minimum (i.e. on the length of the edge) .
For example, in the preferred examples, a local maximum (or a local minimum) in a pair of successive local extremes of opposite types is identified as being an edge if (1) the absolute delta in pixel value between the local minimum and ie local maximum exceeds a contrast threshold (for example a minimum absolute delta); and / or (ij) the number of pixels between the local maximum and the local minimum does not exceed an edge length threshold (for example a maximum edge).
it will be noted that the number of pixels between a local minimum and a local maximum provides an edge length.
The criterion based on the difference in pixel value between the local maximum and local minimum in the pair, and the criterion based on edge length can each be used to identify edges of a certain type - for example, they can be used to identify the edges of the text of one or more types of font.
Thus, taking into account the above, it will be noted that the edges detected here may be a local extremum in a pair of successive local extremums of Opposite types which satisfies (1) the contrast criterion based on the difference in value of the pixels between the local maximum and the local minimum in the pair, and / or {Hi} to the edge length criterion based on the number of pixels between the local maximum and the local minimum.
Notwithstanding the above, it will also be seen that the methods presented here can identify raster regions as a function of () the number of horizontal edges and vertical edges; and / or (ij) the length of similar pixel segments. ideally, for the most accurate results, raster regions are identified based on () the number of horizontal edges and vertical edges, and (ii) the length of similar pixel segments.
In one series of examples, the step of determining whether a sub-region is rasterized may include identifying whether the number of horizontal edges and the number of vertical edges each exceed a predetermined threshold number. The predetermined number of thresholds can define the minimum number of edges and in some cases can be scaled according to the average edge length in the town hall. In this regard, the methods can also include determining the average edge length in the die. In some cases, the number of predetermined thresholds may be based on the area of the subregion - for example, it may depend on the area of the subregion to which the matrix corresponds. The predetermined threshold may also depend on an expected minimum percentage of edges in the sub-region.
Further, or alternatively, the step of identifying whether a sub-region is rasterized may include determining whether the number of horizontal edges versus the number of vertical edges exceeds a predetermined ratio. The predetermined ratio ideally sets a maximum ratio between the horizontal edges and the vertical edges, but, of course, it can also set a minimum ratio. The predetermined ratio can be used to identify certain forms of screening - for example, it can be used to search for circular shaped screening.
In a series of examples, the lengths of the segments can be weighted according to their size; and the etane of identifying whether the subregion is screened comprises determining whether the sum of the weighted lengths is greater than a predetermined sum threshold. In some examples, the predetermined sum threshold can be scaled based on an average edge length of the matrix. In this regard, the methods can also include edge detection along the lines of the die and determining the average edge length in the die.
In some examples, the methods may also include a step of: if the sub-region is identified as rasterized, setting a pixel of a mask (eg, a raster identification mask) to a first value (eg black), where the defined pixel is co-located with the central pixel of the image subregion - i.e. where the defined pixel in the mask has the same coordinates as the central pixel of the sub - region in the picture. Likewise, the methods may also include a step of: if the sub-region is not identified as being rasterized, setting a pixel of the mask to a second value (e.g. white), where the adjusted pixel is co-located. with the central pixel of the image sub-region. ideally, the second value is different from the first.
It will be understood that the black pixels of the mask identify the location of the raster regions of the image. Accordingly, the mask provides a map that can be used by subsequent methods to selectively traverse (eg, selectively process) the screened / unframed regions.
In some examples, the methods may also include binarizing the processed image to generate a binary image for further processing - for example, the methods may include binarizing the image after selectively applying a function of. smoothing.
In still other examples, the methods may also include performing an objection detection method (eg, an OCR method) on the processed image - eg, on the selectively processed image or on the image processed. binary image.
In some examples, the defined pixel matrix is a selected sub-region of pixels in the image. For example, the pixels of a sub-region of the image can define the pixels of the matrix.
In one set of examples, the methods may include sampling the image to obtain a sampled image. In these cases, the defined array of pixels may be a selected sub-region of pixels of the sampled image. That is, for example, the pixels of the sampled sub-region may define the pixels of the array.
In some examples, the image is sampled at a sampling factor based on the average edge length of the horizontal and / or vertical edges in the image. Thus, the methods can include determining the average edge length of the horizontal and or vertical edges of the image.
Preferably, the step of defining a matrix of pixels consists in applying a sliding window function to the image / the sampled image. The pixels of the sliding window preferably define the pixels of the matrix.
ideally, the methods define a matrix centered on each pixel of the sampled image / image (e.g. by centering a sliding window on each pixel of the sampled image / image), and each matrix is analyzed to identify whether its sub -corresponding region is screened according to {) the number of horizontal edges and vertical edges of the town hall; eVou (Hi) lengths of segments of similar pixels in the matrix. This analysis can of course include the execution of the segment detection and / or edge detection methods described in this document. In addition, the sub-regions corresponding to the matrices can be treated selectively according to the selective treatment provided by this document.
It will also be seen that since the matrix corresponds to a sub-region of the image, the methods used here can also identify the matrix to be rasterized as a function of the length of the segments. That is, for example, if the sub-region is identified as raster, the city council may also be identified as raster, or vice versa.
The image can be received from an input image source such as a scanner, camera, computer, or smartphone. The received image can be a grayscale or a color image. However, if the received image is in color, the method may consist of converting the image to gray levels.
The invention extends to an image processing device comprising processing means arranged to process an image having a grid of pixels, preferably before object detection processing, according to any one of the methods described. here The processing means can be a single processor or a set of components comprising a processor and other logical units. For example, the image processing device may include a processor, an edge detector, a segment detector, a raster region detector, and a selective processing unit. The processor can be arranged to define a matrix of pixels. The edge detector may be arranged to perform edge detection and count the number of edges. The segment detector may be arranged to detect the segments. The raster region detector may be arranged to identify whether a sub-region is raster. The selective processing unit can be designed to selectively process sub-regions of the image. It emerges from the following description that the processing means can comprise other logical units and that the logical units of the processing means can execute other steps of the methods described here.
The invention further extends to a programmable device programmed to perform any of the image processing methods described herein. The invention further extends to a computer program adapted to enable a programmable device to perform any of the image processing methods described herein. The computer program may be software, which may be stored on a non-transient computer readable medium. Thus, the invention further extends to a non-transient computer readable medium comprising software adapted when executed on a programmable device (e.g. an image processing device) to perform any of the methods. image processing methods described here.
ti BE2019 / 5141 In another aspect, software adapted to cause an image processing device to: define a matrix of pixels corresponding to a sub-region of the image; performing edge detection along the rows and columns of the matrix; counting the number of edges detected along the rows of the matrix to determine the number of horizontal edges in the matrix; counting the number of edges detected along the columns of the matrix to determine the number of vertical edges in the matrix; identify whether the sub-region is rasterized based on the number of horizontal and vertical edges of the matrix; and selectively processing the corresponding sub-region of the image depending on whether or not the sub-region is identified as being rasterized.
In yet another aspect, there may be software adapted to cause an image processing device to: define an array of pixels corresponding to a sub-region of the image; detecting segments of similar pixels in rows of the array, where the difference in pixel value between neighboring pixels in a segment is less than a predetermined contrast threshold; identify if the sub-region is rasterized according to the length of the segments; and selectively processing the corresponding sub-region of the image depending on whether or not the sub-region is identified as being rasterized.
it is understood that any of the features described herein in relation to a particular set of embodiments / examples may be combined with features of another set of embodiments / examples without any other limitation than those conferred by the broadest aspects of the invention as defined above.
Brief Description of the Drawings Certain preferred examples of the invention will now be described, by way of example only, with reference to the accompanying drawings, in which:
Figure 1 is a schematic drawing of an imaging system according to an example of the present invention; FIG. 2 is a schematic block diagram illustrating certain functions of an image processing device incorporating the invention; FIG. 3 illustrates an edge detection method according to an example of the present invention; Fig. 4 is a segment detection method according to an example of the present invention; Fig. 5 is a sampling method according to an example of the present invention; Fig. 6 is a raster region identification method according to an example of the present invention: Fig. 7 is a raster region determination method according to an example of the present invention; Fig. 8 is a screening elimination method according to an example of the present invention; Fig. 9 illustrates an example of an input image having text in a raster region and text in a white background region; FIG. 10 illustrates an example of a rasterized identification mask which can be generated from the input image of FIG. 9; Figure 11 illustrates an example of a processed image which has been generated by selectively smoothing the raster regions of the input image of Figure 9; Figs. 12A and 12B show an enlarged portion of the input image of Fig. 3 and the processing image of Fig. 11, respectively, for comparison.
Detailed Description Figure 1 shows an OCR system 1 comprising an image processing device 20. The image processing device 20 embodies the invention and is designed to receive an input digital image 15 from a source. input image 10. The input image source 10 may be, for example, a camera 11 (for example, a DSLR digital SLR camera or a smartphone), a scanner 12 (for example, a scanner. flatbed), a storage unit 13 or any other image source capable of providing an input digital image 15 to the image processing device
20. The storage unit may be a database, memory, disk drive, or other data storage device configured to store an input digital image. Preferably, however, the storage unit 13 is a storage server or a memory of a computer.
The input image 15 comprises an array of pixels and defines at least one text region and at least one raster region. The input image can be a color image or a grayscale image, of any size or aspect ratio.
Fig. 9 shows an example of a grayscale input image 15 which has a uniform white background 901 with a raster region 902. Input image 15 also contains text of different sizes. Some text appears over a white background region 903, and some appear over a raster region 904. In general, it is difficult for OCH systems to recognize text in raster regions, especially when they are displayed. are small. Further, it is difficult for these OCR systems to distinguish between uniform background regions comprising small text (eg, 905) and background regions comprising raster data (eg. , 902}. As described in more detail below, image processing device 20 identifies the raster region (s) in the input image 15 and preferably generates a mask (e.g., an identification mask. dithering) to indicate the locations of the raster regions in the input image 15. Figure 10 shows an example of the raster identification mask 101 which was generated by processing the input image of Figure 9 through using a method according to the raster region identification method of Fig. 6. As illustrated, the raster identification mask 101 is a binary image comprising black and white pixels. The black pixels 102 correspond to the regions. identified as raster. Conversely, white pixels 103 correspond to regions which have not been identified as being rasterized.
In some examples, the image processing device 20 may generate a processed image 16 by selectively applying an image processing function (eg, a smoothing function or other filter) to portions of the input image. 15 that have been identified as halftone (e.g. 102). Ideally, the image processing device 20 leaves the rest of the input image 15 in its original state -
it will therefore be seen that the processed image 16 can be identical to the input image 15, except for the smoothed regions. It will also be seen that the image processing device 20 saves processing resources by not applying an image processing function to the whole of the input image 15. In some examples, the processing device Image Selectively applies the image processing function based on the location of the raster regions identified in the raster identification mask. In other examples, the image processing device may apply an image processing function as soon as it determines that a currently scanned region of the input image corresponds to a raster region.
Preferably, the image processing device 20 applies a smoothing function to the identified screening regions to generate a processed image 16. Fig. 11 shows an example of a processed image which has been generated by smoothing the screening regions of the image. The input image of Figure 9. Figures 12A and 12B show enlarged views of the co-located regions of Figures 9 and 11 for comparison. As shown in Figure 125, the level of dithering around the word "colored" has been reduced compared to Figure 12A, Figure 2 shows some preferred components of the image processing device 20 which include an edge detector 21, a segment detector 22, a sampler 23, a raster region detector 24, a raster identification mask generator 25, and a selective processing unit 26. These components shown may be separate logical units or their functions may be. performed by a processor of the image processing device 20. The processor 20 can also perform the functions of the OCR processing device 40 or of another object detection device. The processor can be programmed to perform these functions by executing machine readable code. Thus, in some examples, the functions of the image processing device 20, the OCR 20, and / or an object detection method may be part of the same software product, which may be executed by a processor.
The edge detector 21 is designed to perform any of the edge detection methods described herein. The segment detector 22 is arranged to detect uniform segments of pixels in a given set of image pixels according to a segment detection method described herein. The sampler 23 is arranged to sample an input image 15 in order to obtain a sampled image at lower resolution. Preferably, sampler 23 samples an input image 15 according to a sampling method described herein. The raster region detector 24 is arranged to determine whether a given set of pixels in the image are rasterized.
The set of pixels may be the pixels of a given window of an input / sampled image 15. The raster identification mask generator 25 identifies which region (s) of an image. input 15 is / are rasterized using any one of the raster region identification methods presented herein. Preferably, the raster identification mask generator 25 generates a binary mask (e.g. black mask and white) that indicates which pixels in the input image are part of a raster region. The selective processing unit 26 is arranged to eliminate / reduce dithering in a raster region of the image using a dithering elimination method described herein.
The processed images 16 generated by the image processing device 20 can be used in subsequent methods such as binarization, OCR or any other object detection method. Note that the efficiency of these subsequent methods can be improved by removing or reducing dithering in the input image 15. For example, the efficiency of a binarization step to separate the text from the rest of the image. the image will be improved by removing / reducing dithering in an input image 15.
In Fig. 1, the image processing device 20 supplies the processed image 16 to an OCR processing device 40, but in other examples, it may, in addition or alternatively, provide the processed image to an OCR processor. another type of object detection device for further processing or it may simply output the processed image 16 as an enhanced version of the input image 15. The OCR processing device 40 can apply any standard character recognition method to convert the text of the processed image 16 into machine encoded form, such as ASCII code.
Image processing device 20 may communicate with input image source (s) and / or OCR processing device 40 via a wired and / or wireless connection. The wireless connection can be a WiFi, Bluetooth or ZigBee connection. In addition, some or all of the communication can take place over a wide area network (WAN - like the Internet) or over a local area network (LAN). Accordingly, it will be appreciated that the system illustrated in FIG. 1 may include other conventional components (eg routers, receivers andor transmitters) to facilitate the various communications. However, for the sake of simplicity, these conventional components are not shown in the drawings.
The image processing device may also have other conventional components, such as memory, battery, etc., but these are omitted from the drawings for the sake of simplicity.
Figure 3 shows an edge detection method which, as detailed below, is preferably used in the examples below to, for example, sample an input image and determine whether a given set of pixels are rasterized. . An advantage of this edge detection method is that it allows edges to be detected and characterized quickly (for example, by characterizing the length and gradient of an edge). The method also makes it possible to calculate the values of the summed area tables (that is to say of the integration tables) and / or of the circular buffers as each row of pixels is analyzed. However, the present invention is not necessarily limited to the use of this edge detection method, and it will be appreciated that the examples presented here may alternatively use conventional edge detection methods to detect edges (e.g. horizontal and vertical edges) and conventional edge characterization methods (for example, to characterize edge length and contrast); but with possibly a falling performance.
The edge detection method of Figure 3 can be applied to a line of pixels of an image (eg, an input / sampled image). The line can be a horizontal line of pixels or a vertical line of pixels in an image. For example, in some methods (eg the sampling method) the edge detection method can be applied to an entire row or to an entire column of the input image 15. In other methods (eg. example, the raster region determination method), the edge detection method can be applied to an entire row and / or an entire column of a window of an image (for example, the edge detection method may be applied to one or more rows and / or columns of a sub-area of an image, WHERE the sub-area can be defined by applying a sliding window to the image).
In step 301, the edge detection method begins to sequentially analyze each pixel along a line, along a scanning direction (e.g., left to right or vice versa, or top to bottom or vice versa). In step 302, the method compares the value (eg, intensity) of the pixel currently analyzed with the value of the previous pixel. Based on this comparison, the method determines whether the intensity profile of the image in that region is descending, ascending, or flat. For example, if the value of the current pixel is less than that of the previously analyzed pixel, the method determines that the intensity profile in that region of the image is descending, conversely, if the relative value of the current pixel is greater than or equal to that of the previous pixel, the method determines that the intensity profile is respectively ascending or flat.
In step 303, the method determines whether the preceding pixel is a local minimum or a local maximum. In general, a local minimum pixel has a value less than one or two neighboring pixels, and a local maximum pixel has a value greater than one or both of its neighboring pixels. The previous pixel can be considered as a local minimum pixel when the intensity profile changes from a descending profile to an ascending profile or to a flat profile. Conversely, the previous pixel can be determined to be a local maximum pixel when the intensity profile changes from an ascending profile to a descending profile or to a flat profile. If the intensity profile does not change and remains flat, the method can optionally increment the position of the pixels by the local minimum or the local maximum previously found. For the sake of simplicity, the term "local sxtremum" is used here to commonly denote a local minimum or a local maximum.
In step 304, the method determines whether a pair of successive local extremes of opposite types has been found (eg, a local minimum followed by a local maximum, or vice versa). If a pair of successive local extremes of opposite types is not found, the method proceeds to the analysis of the next pixel along the line in step
310.
If a pair of successive local extremes of opposite types is found, the method proceeds to characterize the pair in steps 305 and 306. More precisely, the method calculates the absolute delta in pixel value between the pair of extremes. local values (eg, the difference in pixel value between a local minimum and a successive local maximum) to obtain a contrast value in step 305. The method also calculates the number of pixels between the pair of local extremes for Obtain an edge length at step 306. Note that the contrast and edge length provide an indicator of the gradient between the pair of local extrema. The edge length also provides an indicator of smoothness. In step 307, the method determines whether the contrast calculated in step 305 satisfies a contrast criterion and whether the edge length calculated in step 306 meets an edge length criterion. The contrast criterion is preferably satisfied when the calculated contrast exceeds a minimum contrast threshold. Likewise, the edge length criterion is preferably satisfied when the calculated edge length is less than a maximum edge length threshold, the minimum contrast threshold and the maximum edge length threshold can each, respectively, define a absolute delta Minimum in pixel value and a maximum edge length that is expected for an authentic edge or edge type (s). For example, the minimum contrast threshold can define the minimum absolute delta expected for a text edge of one or more types of fonts, preferably 20 or 40, or any number between 20 and 40. Preferably, the value of the minimum contrast threshold is a gray level value. The maximum edge length can define the maximum edge length of a text edge of one or more font types and is preferably 8 or 12, or any number of them. Thus, it will be noted that the edge length criterion and the contrast criterion can each be used to filter out false edges and / or unwanted edges.
In step 308, the method identifies the local maximum and / or the local minimum of the pair of local extrema as an edge if the contrast and edge length criteria in step 307 are both satisfied. The identified edges can be characterized by the contrast and edge length values calculated in steps 305 and 306. Conversely, in step 309, the method identifies the local maximum and / or the local minimum of the local extrema pair. as a non-edge if either or both of the contrast criteria are not met. In step 310, the method analyzes the next pixel along the line, if present. Once a line has been processed, the edge detection method can then be applied to sequentially analyze subsequent lines of an image / window of an image. In this way, the edges of a window or an entire image can be detected and characterized.
It will be noted that if the edge detection method is applied to a horizontal line, the method will detect and characterize the horizontal edges. Conversely, if the method is applied to a vertical line, it will detect and characterize the vertical edges.
Although not shown in Figure 3, the edge detection process can also update / generate an integration table (e.g. table of summed zones) and / or an equivalent circular buffer to keep a count of all horizontal and / or vertical edges that the process has detected. The implementation of such integration tables and equivalent circular buffers will be familiar to those skilled in the art since they are common computer tools, but it will of course be noted that the use of such tables / buffers in the methods provided here may not be known. The elements of an integration table and / or an equivalent circular buffer are preferably updated / generated according to logical expression [1] when parsing horizontal rows. Conversely, if vertical lines are analyzed, the elements of an integration table and / or an equivalent circular buffer are preferably updated / generated according to logical expression [2]. Preferably, the elements are updated / generated on the fly each time the edge detection method analyzes a row of pixels (for example after step 308 and before step 310).
Element (x, y) = Element (x, y-1) + sum_rows [1] Element (x, y) = Element (x-1, y) + sum column [2] Where: The element (x, y ) is the element of the buffer table associated with the window image / pixel at coordinates (x, y); The element (x, y-1) represents the number of edges identified along the horizontal line of the image / window at the time of pixel analysis (x, y-1}; The element (x-1, y) represents the number of edges identified along the vertical line of the image / window at the time of pixel analysis (x-1, y):
Row_sum is the number of edges identified along the horizontal line of the image / window at the time of pixel analysis (x, y); and Sum_column is the number of edges identified along the vertical line of the image / window at the time of the analysis of the pixel (X, y).
In addition to updating / generating a respective circular integration / buffer table for the number of horizontal edges and / or vertical edges, the edge detection method can also update / generate a table of integration and / or an equivalent circular buffer to keep track of the sum of the edge lengths. The integration table / buffer for sum of edge lengths can be based on the edge lengths calculated during horizontal edge or vertical edge detection. The elements of the integration / buffer table for the sum of the edge lengths are preferably updated / generated according to logical expression 13]. As with the integration tables / buffers for horizontal and vertical edge counting, the elements of the integration table / buffer for the sum of edge lengths are preferably updated / generated on the fly when the edge detection analyzes a row of pixels (eg, after step 308 and before step 310).
Element (x, y) = Element (x, y-1} + sum_line [3] Where: The element (x, y) is the element of the table / buffer associated with the image / pixel of the aux window coordinates {x, y}; Element (x, y-1) represents the sum of edge lengths along the image / window line at the time of pixel analysis (x, y-1) ; and Line Sum is the sum of the edge lengths along the image / window line at the time of pixel (x, y) analysis.
In general, it will be noted that each element of an integration table and / or of a buffer is associated with a given pixel of an image / window of an image. In addition, a given element of an integration table / buffer can provide a global value. For example, a given element of an integration / buffer table to count the number of horizontal edges can provide the total number of horizontal / vertical edges that have
Di BE2019 / 5141 was found by the edge detection method up to the point of analysis (and including the point of analysis), of the pixel which is associated with the given element.
As is more apparent from the rest of this description, the counting of the horizontal and vertical edges and / or the sum of the edge lengths can be used in other methods - for example to sample an input image andor detect a raster region. . In some examples, it is preferable that these methods use an integration table and / or an equivalent ciroular lamp to determine these values because they are fast and economical in resources. However, it should be noted that these methods are not limited to the use of integration tables and / or circular buffers, and that they can also use other means to determine these values, without however presenting the same advantages in terms of speed and efficiency. For example, in some examples, the methods can repeatedly count the number of horizontal edges as needed.
Figure 4 shows a segment detection method. The method identifies a segment of pixels which satisfies a uniformity criterion and, like the edge detection method, can be applied to a line of pixels of an image - for example during the raster detection method of FIG. 7.
In step 401, the segment detection method begins to sequentially analyze each peel along a line (eg, left to right). In step 402, the method determines the absolute delta (i.e. the absolute difference) in value (e.g., intensity) between the currently analyzed pixel and the previous pixel to obtain a contrast value. The method then determines whether the absolute delta meets a uniformity criterion in step 403. The uniformity criterion is preferably a maximum contrast threshold and can be satisfied when the difference calculated in step 402 is less than. this contrast threshold. The contrast threshold can be predetermined and is preferably set to a value of 10, 20 or 30, or any number between 10 and 30. A contrast threshold of 20 is particularly advantageous because it allows for the presence of 'low frequency noise in the background, while filtering out larger changes in contrast due to text-to-background transitions and / or high frequency noise (such as dithering). Ideally, the maximum contrast threshold used in the segment detection method is different from the minimum contrast threshold used in the edge detection method.
If the uniformity criterion is met in step 403, the current pixel is considered to belong to the same segment as the previous pixel and, therefore, the segment of the previous pixel increases by one pixel in step 404. Well Of course, if the previous pixel is not already part of a segment, a new segment is created in step 404 to include the previous pixel and the current pixel. If the uniformity criterion of step 403 is not satisfied, step 406 permanently stops the growth of the segment of the previous pixel. In this way, it will be noted that each segment can only contain pixels which change sequentially by less than the contrast threshold.
In step 405, the segment detection method increases the value of a sum of lines as a function of the length of the current segment (i.e. the segment associated with the current pixel). Preferably, a fraction of the length of the current segment is added to the sum of lines. For example, the sum of lines can be increased according to logical expression [4], preferably when the segment detection method analyzes the line of pixels. line sum + = x / divisor [4] Where x is the current segment length, and the divisor is a predetermined integer such as 1 or 10, or any number between them. it will be noted that expression [4] gives a triangular number of x. We will also see that when the divisor is chosen to be 1, then the total value added to the row sum when a segment stops growing will be given by the expression [S]. line_sum = x "{(x + 1Y2 {51 it will also be noted that a new line sum is calculated for each new line analyzed by the segment detector. In addition, each time a segment grows, its length (or preferably a fraction of the length) at this time is added to the sum of rows. This way the longer segments have more weight. Therefore, as uniform backgrounds ( with or without text) have longer segments, we will see that these regions have more weight in the sum of lines, so we will also see that the segment detection method provides the weighted lengths of each segment that it detects.
In step 407, the segment detection method analyzes the next pixel along the line, if present. Once the process has finished analyzing the row, it can of course be applied to another row in the image / window. Although not shown in Figure 4, the segment detection method can also update / generate the elements of an integration table (eg, an added area) and / or an equivalent circular buffer. ; preferably according to logical expression [6] if we analyze the horizontal lines and preferably according to logical expression [7] if we analyze the vertical lines. Separate tables / buffers are preferably generated / updated for vertical lines and horizontal lines. In addition, the elements of the integration tables / buffers are ideally updated / generated as the segment detection process seguentially analyzes each row of pixels (for example, after step 405 and before step 407). Element (x, y) = Element (x, y-1) + sum line 6] Element (x, y} = Element (x-1, y) + sum line [7] Where: The element (x, y ) is the element of the buffer table associated with the image / pixel of the window at coordinates (x, y); The element (x, y-1) represents the sum of rows according to the logical expression [5] at time of pixel analysis (x, y-1}; Element (x-1, y) represents the linear sum according to logical expression [5] at the time of pixel analysis (X-1, v); and the sum of rows is the sum of rows given by logical expression [5]. Based on expressions [6] and [7], it will be noted that a given element of the table / buffer integral can store the sum of the sums of lines (e.g. the sum of the triangular number of segment lengths) calculated by the segment detection method up to the analysis point (and including the analysis point) of the pixel
DA BE2019 / 5141 associated with the given element, and including the latter. It will also be understood that since the sums of rows provide weighted segment lengths, the sum of the sums of rows is a weighted sum.
The sum of the sums of lines is used for the detection of a raster region, for example. And, as with edge counts, the integral table / buffer provides a fast and efficient way to determine the sum of the sums of rows when necessary, but the methods here are not limited to using integral tables / buffers for this determination.
Figure 5 shows an optional sampling method which samples an input image 15 to obtain a lower resolution image. An advantage of such a subsampling of an input image is that it allows faster and more accurate detection of edges during subsequent edge detection processes (for example, during the edge detection step. edges of figure 6). H also allows faster detection of segments. In step 501, the sampling method receives an input image 15. Assume that the input image 15 is grayscale and, if necessary, has been converted from color to grayscale before the input image 15 is received at step 501. This conversion can be performed by the image processing device 20. At step 502, the edge detection method of Fig. 3 is applied to each row of the input image 15 successively (eg top to bottom) to detect horizontal edges and determine their respective edge length. In step 503, the sum of all edge lengths is divided by the total number of horizontal edges to determine an average edge length. Preferably, the edge lengths are summed directly as they are calculated during the edge detection process. However, the sum of the edge lengths can alternatively be determined using an edge length integration table or an equivalent circular buffer. As previously indicated, the integration table / circular buffer can be generated as part of the edge detection process.
In step 504, the sampling method determines whether the average edge length calculated in step 503 and the number of horizontal edges detected meet the respective sampling criteria. The criteria for the average edge length are met when the average edge length is less than a maximum sampling factor and is not equal to two. The criterion of the number of horizontal edges is met when the number of horizontal edges exceeds a minimum number of edges. By thus fixing a minimum number of horizontal edges required, it is ensured that the average length of edges is significant.
If the sampling criteria of step 504 are met, the input image 15 is sampled in step 505 to form a lower resolution sampled image using the average pixel length calculated in step 503 as a sampling factor. Any standard sampling method can be used for this purpose. It will be noted that the requirements of the sampling criteria ensure that the average pixel length provides an optimal sampling factor.
If the sampling criteria of step 504 are not met, the sampling method decides not to sample the input image 15 (step 506). However, the calculated average pixel length can be used in subsequent methods such as the edge determining steps of Figures 6 and 7.
It should be noted that while the sampling method of FIG. 5 is based on the analysis of the horizontal edges, the sampling method can also be based on the analysis of the vertical edges.
An example of a method of identifying a raster region will now be described with reference to FIG. 6. This method preferably uses a sliding window technique to successively analyze different parts / regions of an image. The image may be the input image 15 or the sampled image. At each window position, it is determined whether or not the portion of the pixels of the image inside the window belong to a raster region of the image. This determination may be based on a characteristic of the edge (s) of the window e1 / or on a characteristic of the level of uniformity in the region. For example, the determination may be based on the number of edges in the window and / or on a characteristic of the uniform segment (s) in the window, such as the sum of the length (s)
of uniform segments in the window. To ensure good precision, it is preferred that the above determination be based both on the characteristics of the window edge (s) and on the characteristics of the level of uniformity in the region. However, it will be noted that some examples may make the determination based on either of these characteristics only.
In step 601, an input image is received. It is assumed that the received input image 15 is in gray level or that it has already been converted from color to gray level, for example by the image processing device 20.
In step 602, the input image 15 is optionally sampled to produce a lower resolution sampled image. Preferably, the input image is sampled using the sampling method of Figure 5. If the input image is not sampled, the remaining steps of Figure 5 can be directly applied. to the input image 15 instead of the sampled image.
In step 603, the method sequentially centers a sliding window on each pixel of the input / sampled image. For an input / sampled image of 300 dpi, the window is preferably 65 pixels by 65 pixels. This window size is ideal for analyzing document images (e.g. A4 documents) as it typically captures background data and one or more parts of text. However, other window sizes can of course be used, and if the image resolution is less than 300 dpi, the window size may be reduced. If the input image is sampled, the window size can be scaled based on the sampling factor (for example, the average edge length). However, it is preferable that the minimum window size is 17 pixels by 17 pixels. In some examples or applications, the window size may be the same as the image.
In step 604, the method comprises determining whether the window is positioned over a raster region of the input / sampled image, based on a characteristic of the edge (s) of the window and / or a characteristic. the level of uniformity of the region. In this example, the determination at step 604 uses the steps described in Figure 7 which, as will be seen, requires the total number of horizontal and vertical edges in the window.
The horizontal and vertical edges of the window are preferably detected by applying the edge detection method of Figure 3 to each of the rows and columns of the window.
The total number of horizontal and vertical edges of the window can then be determined using an integration table or equivalent circular buffer which is generated / updated during the edge detection process.
However, it is better to use a circular buffer for faster detection. It will be appreciated that one skilled in the art will know how the integration table and the circular pad can be used to determine the total number of vertical / horizontal edges.
For example, one skilled in the art will appreciate that the elements of the integration table / buffer that correspond to the image pixels in the corners of the window can be used to calculate the total number of horizontal / vertical edges of the window by function, for example, of the logical expression [8]. sum upLeft + sum downRight - sum upRight - sum _basLeft [8] Where: sum_highLeft is the value of the element that corresponds to the pixel in the upper left corner of the window; sum_basRight is the value of the element that corresponds to the pixel in the lower right corner of the window: sum_highRight is the value of the element that corresponds to the pixel in the upper right corner of the window; and sum_bottomLeft is the value of the element that corresponds to the pixel in the lower left corner of the window.
In step 701, the method determines whether the number of horizontal edges in the window and the number of vertical edges in the window meet a raster region criterion.
The raster region criterion is given by logical expression [9], which compares the number of vertical edges (nbOfVerticalBords) to a minimum threshold (minNumberOfBords) and the number of horizontal edges (nbOfHorizontalBords) to this minimum threshold.
As will be seen, the criterion of the screened region is satisfied when the number of vertical and bhorzontal edges exceeds the minimum threshold (minNumberOfEdges).
WindowWithBackTrackPlanWithoutText = (nbOfHorizontalEdges> minNumberOfEdges) && (nbOfVerticalEdges> minNumberOfEdges) [9] The minimum threshold (minNumberOfEdges) depends () on the area of the image covered by a minimum percentage of the window (ZoneFen) and ii edges in the window (minimumPourceniageEdges), according to logical expression [10].
minNumberOfEdges = (WindowArea * minimumPercentageEdges) / 100 [10] Note that although the window is of fixed size, it can sometimes cover areas of different size of the image. For example, the window may cover a smaller area of the image when it is centered on a corner pixel of the image relative to a window centered in the middle of the image. Therefore, the number of edges that can be contained in a window may vary depending on the position of the window. To take this variation into account, it is advantageous to make the minimum threshold depend on the Window Zone and / or on the minimumPercentageEdges.
In some examples, the minimum threshold (minNumberOfEdges) can be scaled according to the average edge length in the window (AverageLengthOfEdgesInWindow) according to, for example, expression [11]. Preferably, the average edge length is based on the length of the horizontal edges and / or the length of the vertical edges of the window. In addition, the scaling preferably occurs when the input image is not sampled in step 602.
minNumberOfEdges = minNumberOfEdges / (AverageLengthOfEdgesInWindow y AverageLengthOfEdgesInWindow) 111] In step 702, an additional check is made to determine whether the ratio of the number of horizontal edges to the number of soiled vertical edges has a threshold ratio (ratio of EdgesVsVertiSeullOnly). An appropriate criterion for this verification is given by the logical expression [12], which imposes a maximum ratio of
1.5. If the ratio between the number of horizontal edges and the number of vertical edges is less than the threshold ratio, the threshold ratio criterion is met. The threshold ratio criterion can be used to search for certain shapes of raster regions. In general, the raster regions are round and therefore the threshold ratio can be adjusted to find the round regions where the number of vertical edges should be similar to the number of horizontal edges. Therefore, the application of the ratio test of only! The raster region detection method has the advantage of improving the accuracy of determining whether a pixel region is raster or not. Another advantage is that the ratio can be used to avoid falsely determining a dotted line in a region. of the image as being a raster region, by selecting a sufficiently low threshold ratio.
rapporthoriVsVertiSeuilenDessousBords = ({nbOfHorizontalBords> nbOfVerticalBorder) (2 * nbOfHorzontalEdges <= 3 * nbOfVerticalEdges): (2 "i5 —nbOfVerticalEdges <(3 * noOfHorzontalEdges}}) [12] In step 703, the pixel uniformity of the window is analyzed to determine if the level of Uniformity meets a threshold uniformity criterion The level of uniformity in the window can be determined based on the lengths (preferably weighted lengths) of the uniform segments of the window.
The uniform segments and their lengths are preferably determined by applying the segment detection method of Figure 4 to each row / column of pixels in the window, and then determining the sum of their weighted lengths (e.g., the sum of the number triangular of their lengths). As mentioned earlier, a circular integration / buffer table can be used to determine the sum of the weighted lengths.
Pixels in the window are determined to contain mostly uniform segments when the sum of the weighted segment lengths in the window (SegmentLengthValue) is less than a maximum segmentlength threshold (maxSegmentLengthValue), according to Expression [13].
OnlySmallSegments = SegmentLengthValue <maxSegmentLengthValue [13]
When it is determined that the pixels of the window contain predominantly uniform segments, the threshold uniformity criterion is not met Conversely, the window can be determined to contain predominantly uniform segments when valueSegmentLength> maxValueLengthSegment. In this case, the uniformity threshold criterion is met.The principle behind checking the above criteria is that, if a window contains dithering (with or without text), there is usually almost no "long" segments due to screening noise. If the background is uniform, there will usually be at least a few longer segments (e.g. due to white space between lines of text and / or white space surrounding lines of text). In the segment detection method, it will be seen that the more a segment lengthens, the heavier its weight will be. Therefore, in this way, it can be ensured that the threshold uniformity criterion is likely to be satisfied whenever there are a few longer segments (or a very long segment). it will also be noted that the maxSegmentLengthValue is designed such that if the window contains only one uniform segment having the same length as the width of the window, the threshold uniformity criterion will probably be satisfied. it will also be noted that the maxSegmentLengthValue depends on the width of the window, since it is assumed that the segment detection method is applied to the horizontal lines. However, if the segment detection method is applied to vertical lines, it will be understood that the maxSegmentLengthValue will depend on the height of the window. It will also be understood that the maximum allowable segment length will increase with the width and height of the window.
In some examples, preferably when the input image is not downsampled in step 602, the maxSegmentLengthValue can be scaled based on the average edge length in the current window position, according to expression [14].
maxSegmentLengthValue = maxSegmentLengthValue {averageLengthBordInWindow * average LengthBordInWindow) [14] If the criteria of steps 701 and 702 are met and the criteria of step 703 are not, the process identifies in step 704 the current window position on a raster region of the input image. If one or more of the criteria in steps 701, 702, and 703 are not met, the method identifies the current window position as being above an unframed region.
Referring to Figure 6, when step 604 has determined that the current window position is above a raster region, the method identifies which pixel in a raster identification mask is co-located with the raster region. pixel centered at the current window position at step 605. The identified pixel is then set to black to mark that pixel as a pixel in a raster region. It will be noted that the mask has the same size and the same pixel resolution as the image to which the sliding window is applied. Therefore, it will be seen that the marked pixel and the pixel in the center of the window in step 604 share the same image coordinates.
In step 606, if the input image is sampled, the method identifies an area of the original input image (i.e., the input image before it was sampled. ) which corresponds to the same area of the sampled image on which the current sliding window is placed. This way the corner pixels of the identified region will of course be the same as the corner pixels of the window. The area identified on the original input image is then analyzed using the edge detection method to determine the local average edge length of that region.
If the input image is not sampled, it will be noted that the sliding window is already positioned on the original input image. In this case, the identification step can be omitted and the local average edge length can be calculated from the pixels of the window.
In step 607, the local average edge length is added to a total of all the local average edge lengths. Note that this total is based only on the average edge length in the regions where Von has determined to be screened.
When step 604 determines that the current window position is above an unframed region, the method identifies which pixel in a raster identification mask is co-located with the center pixel in the current position of the window. window in step 609. The identified pixel is then governed by white, or any other color different from the color defined in step 605.
Step 510 determines whether the sliding window has been sequentially centered on each pixel of the input / sampled image. If there are still a few pixels left, the method centers the sliding window on the next pixel in step
608.
After the process of Figure 6 is completed, note that the black pixels of the raster identification mask indicate the rasterized regions of the input image, and the white pixels indicate the unframed regions. This is an advantage because it allows subsequent image processing techniques to target these regions for processing. For example, an adaptive binarization method can be applied selectively to the black regions identified in the raster identification mask. Additionally or alternatively, a dithering removal method, such as a smoothing method, may be selectively applied to regions of the image which correspond to black regions in the dithering identification mask. An example of a selective application of a smoothing function to the black areas of the screening identification mask is described in figure 8.
If the screening identification mask was generated from a sampled image, the mask may optionally be oversampled, using any standard oversampling method. To improve the mask, a certain number of morphological operators can also be applied to it. For example, a close operator can be applied to the mask to close spaces in the mask that are smaller than a given maximum number of pixels. Additionally, or alternatively, an erosion operator can be applied to erode small black areas that are smaller than a given size. These small black areas can be false detections and it is therefore advantageous to remove them. Additionally or alternatively, a dilation operator can be applied to restore black areas to their original size.
FIG. 8 shows a method of eliminating screening. In step 801, the method identifies the pixels of the original input image which correspond in position with the black pixels of the raster identification mask - i.e., the raster identification mask is used to determine which pixels of the original image are rasterized.
In step 802, a smoothing function is applied to each of the pixels identified in the original image. The smoothing function can be a standard smoothing function. The smoothing radius for controlling the level of smoothing applied by the smoothing function is preferably based on an average edge length. The average edge length is ideally the average edge length over all identified screening regions, rather than an average edge length over the entire image - this is advantageous as it provides a more precise fit radius for Selectively smooth the dithering regions on the image. The average edge length can be calculated using the total local average edge length calculated in step
607. If, however, a different smoothing radius or a different average edge length is used, HI will be noted that steps 506 and 607 can be omitted from the method of Figure 6.
More generally, it will be understood that any parameter of a screening elimination process which controls the level of screening elimination may be based on an average edge length, such as the average edge length in all of the screening regions. identified or the average local edge length in an identified screening region.
Optionally, once the image is smoothed, it can then be binarized. It will be noted that the selective smoothing process will give a better quality binary image, which can then be transmitted to an OCR process to improve the character recognition results. However, it will be appreciated that the advantages of the methods described herein may also be useful for other image processing techniques, such as object detection. For example, a raster identification mask,
a smoothed image or a binary image which has been generated according to the examples cited herein can be useful for improving the accuracy of an object detection method.
权利要求:
Claims (1)
[1]
Claims
4. A method of processing a raster image comprising a grid of pixels, the method comprising the steps of: defining a matrix of pixels corresponding to a sub-region of the image; performing edge detection along the rows and columns of the matrix; counting the number of edges detected along the rows of the matrix to determine the number of horizontal edges in the matrix; counting the number of edges detected along the columns of the matrix to determine the number of vertical edges in the matrix; identify whether the sub-region is rasterized based on the number of horizontal and vertical edges in the matrix; the selective processing of the corresponding subregion of the image comprises applying a method of removing dithering to the subregion of the image if the subregion is identified as being rasterized; and selectively processing the corresponding sub-region of the image depending on whether or not the sub-region is identified as being rasterized, wherein determining the average edge length in the corresponding sub-region of the image: setting a dithering suppression method parameter to control the level of dithering suppression to a value based on the determined average edge length ;.
The method of claim 1, wherein the step of identifying whether a sub-region is rasterized comprises determining whether the number of horizontal edges and the number of vertical edges each exceed a predetermined threshold number.
The method of claim 2, further comprising determining the average edge length in the array, and wherein the predetermined threshold number is scaled based on the determined average edge length.
A method as claimed in any preceding claim, wherein the step of identifying whether a sub-region is rasterized comprises determining whether the number of horizontal edges versus the number of vertical edges exceeds a predetermined ratio. .
A method as claimed in any preceding claim, further comprising detecting a segment of similar pixels in the rows of the array, wherein the difference in pixel value between neighboring pixels in a segment is less than a threshold of. predetermined contrast; and wherein the step of determining whether the sub-region is rasterized is further based on the lengths of the segments.
6. Method according to claim 5, in the text: the lengths of the segments are weighted according to their size; and the step of identifying whether the sub-region is rasterized is determining whether the sum of the weighted lengths is greater than a predetermined sum threshold.
The method of claim 6, further comprising: performing edge detection along the rows of the array and determining the average edge length in the array, and wherein the predetermined sum threshold is scaled based on the determined average edge length.
A method as claimed in any one of the preceding claims, wherein the method of eliminating dithering comprises applying a smoothing function to the corresponding subregion of the image.
A method as claimed in any preceding claim comprising: if the sub-region is identified as being rasterized, setting a pixel of a mask to a first value, where the defined pixel is co-located with the pixel. central of the image sub-region.
10. A method as claimed in any one of the preceding claims comprising the step of:
if the sub-region is not identified as rasterized, set a pixel of the mask to a second value, where the adjusted pixel is co-located with the center pixel of the sub-region of the image.
11. A method as claimed in any one of the preceding claims comprising a step of: binarizing the processed image to generate a binary image for further processing.
A method as claimed in any preceding claim, comprising the steps of performing an object detection method on the processed image.
13. A method as claimed in any preceding claim, wherein the defined array of pixels is a selected sub-region of pixels of the image.
14. A method as claimed in any one of claims 1 to 12, comprising sampling the image to obtain a sampled image, and wherein the defined array of pixels is a selected sub-region of pixels of the. sampled image.
15. The method of claim 14, wherein the image is sampled at a sampling factor based on the average edge length of the horizontal and / or vertical edges in the image.
16. A method as claimed in any preceding claim, wherein the step of defining an array of pixels comprises applying a sliding window function to the sampled image / image.
17. An image processing device comprising processing means set to process an image having a grid of pixels, preferably before object detection processing, according to the method as claimed in any one of claims | to 16.
18. A programmable device programmed to perform a method as claimed in any one of claims 1 to 16.
19. A computer program product adapted to cause a programmable device to perform a method of any of claims 1 to 16.
类似技术:
公开号 | 公开日 | 专利标题
BE1017547A6|2008-11-04|COMPRESSION OF DIGITAL IMAGES OF SCANNED DOCUMENTS.
BE1026095B1|2020-11-09|Image processing device
Ntogas et al.2008|A binarization algorithm for historical manuscripts
KR101403876B1|2014-06-09|Method and Apparatus for Vehicle License Plate Recognition
EP3570212A1|2019-11-20|Character recognition method
EP3570213A1|2019-11-20|Character recognition method
FR2905188A1|2008-02-29|Input image e.g. palm imprint image, density converting method for e.g. image processing improving system, involves converting minimum local and maximum local values into minimum and maximum common values, and reconstructing input image
FR2905499A1|2008-03-07|APPARATUS AND METHOD FOR REMOVING CHARACTER NOISE
EP2930659B1|2016-12-21|Method for detecting points of interest in a digital image
US20180182086A1|2018-06-28|Method for assessing the quality of an image of a document
JP5229328B2|2013-07-03|Character area extraction device, imaging device having character area extraction function, and character area extraction program
US8442348B2|2013-05-14|Image noise reduction for digital images using Gaussian blurring
EP3572976A1|2019-11-27|Method for processing a video image stream
JP3906221B2|2007-04-18|Image processing method and image processing apparatus
EP0493855A1|1992-07-08|Local binary segmentation of digital images by histogram thresholding
EP3234913B1|2021-05-05|Method for detecting a defect on a surface of a tyre
FR2870969A1|2005-12-02|DEVICE, METHOD AND PROGRAM FOR REMOVING PORES
WO2004013802A2|2004-02-12|Method and system for automatically locating text areas in an image
EP3311333B1|2019-08-07|Pairing of images of postal articles with descriptors of singularities of the gradient field
Satish et al.2011|Edge assisted fast binarization scheme for improved vehicle license plate recognition
WO2017005930A1|2017-01-12|Detection of objects by image processing
Chowdhury et al.2019|A new U-net based license plate enhancement model in night and day images
Priyanka et al.2015|A Comparative Study of Binarization Techniques for Enhancement of Degraded Documents
FR3109831A1|2021-11-05|Method for verifying a barcode.
CN113920434A|2022-01-11|Image reproduction detection method, device and medium based on target
同族专利:
公开号 | 公开日
WO2019170404A1|2019-09-12|
GB2571928A|2019-09-18|
GB201803748D0|2018-04-25|
US11188779B2|2021-11-30|
EP3762864A1|2021-01-13|
BE1026095A1|2019-10-08|
US20190279018A1|2019-09-12|
引用文献:
公开号 | 申请日 | 公开日 | 申请人 | 专利标题
US6160913A|1998-03-25|2000-12-12|Eastman Kodak Company|Method and apparatus for digital halftone dots detection and removal in business documents|
US20040169890A1|2003-02-28|2004-09-02|Maurer Ron P.|Restoration and enhancement of scanned document images|
EP1455304A2|2003-03-06|2004-09-08|Seiko Epson Corporation|Method and apparatus for segmentation of compound documents|
US6185334B1|1998-01-30|2001-02-06|Compaq Computer Corporation|Method for reconstructing a dithered image|
US6347160B1|1998-01-30|2002-02-12|Compaq Information Technologies Group, L.P.|Increasing the bit depth of and filtering dithered images for the purpose of inverse dithering|
US7221483B2|2000-09-05|2007-05-22|Ricoh Company, Ltd.|Image encoding method and apparatus, image decoding method and apparatus, image processing apparatus, image formation apparatus, and computer-executable programs|
JP2004096375A|2002-08-30|2004-03-25|Fujitsu Ltd|Image encoding apparatus, image decoding apparatus, method and program therefor|
JP4773386B2|2007-03-19|2011-09-14|株式会社リコー|Image processing method, image processing apparatus, program, and computer-readable storage medium|
KR20080110092A|2007-06-14|2008-12-18|삼성전자주식회사|Image forming apparatus and method for enhancing print quality thereof|
US8054506B2|2007-07-19|2011-11-08|Samsung Electronics Co., Ltd.|Image forming apparatus and image quality enhancement method thereof|
JP6418788B2|2014-05-26|2018-11-07|キヤノン株式会社|Image processing apparatus, image processing method, and program|
US10037592B2|2015-06-05|2018-07-31|Mindaptiv LLC|Digital quaternion logarithm signal processing system and method for images and other data types|JP2020067959A|2018-10-26|2020-04-30|キヤノン株式会社|Image processing apparatus, and control method and program thereof|
CN112183538B|2020-11-30|2021-03-02|华南师范大学|Manchu recognition method and system|
法律状态:
2021-01-15| FG| Patent granted|Effective date: 20201109 |
优先权:
申请号 | 申请日 | 专利标题
GB1803748.1A|GB2571928A|2018-03-08|2018-03-08|Image processing apparatus|
[返回顶部]